#include <glade/glade.h>
#include <gtk/gtk.h>

int main(int argc, char** argv)
{
	GladeXML *gxml;
	GtkWidget *hwin;
	gtk_init(&argc,&argv);
	gxml=glade_xml_new("glade1.glade",NULL,NULL);
	hwin=glade_xml_get_widget(gxml,"hwin");
	glade_xml_signal_autoconnect(gxml);
	//-------------------------------------------------

	//--------------------------------------------------
	gtk_widget_show_all(hwin);
	gtk_main();
	return 0;
}
void cb_button1()
{
	GtkWidget *dialog;
	dialog = gtk_message_dialog_new(NULL, 
			GTK_DIALOG_MODAL |GTK_DIALOG_DESTROY_WITH_PARENT,
			GTK_MESSAGE_INFO,
			GTK_BUTTONS_OK,
			"wahahahahaha");
	gtk_dialog_run(GTK_DIALOG(dialog));//显示并运行对话框
	gtk_widget_destroy(dialog);//销毁对话框

}
void CleanBeforeExit()
{
}